import axios from '@/libs/axios1'
let jsonHeaders = { 'content-type': 'application/json;charset=UTF-8' }
let base = '/testplatform/productComponentVulnerabilityRecurrence'

// 创建漏洞的复现
export const addProductComponentVulnerabilityRecurrence = data => {
  return axios({
    url: `${base}/add`,
    method: 'POST',
    data,
    headers: jsonHeaders,
  })
}

// 修改漏洞的复现
export const updateProductComponentVulnerabilityRecurrence = data => {
  return axios({
    url: `${base}/update`,
    method: 'PUT',
    data,
    headers: jsonHeaders,
  })
}

// 查询漏洞复现详情
export const getProductComponentVulnerabilityRecurrenceDetail = (id, vulnerabilityId) => {
  return axios({
    url: `${base}/${id}/${vulnerabilityId}`,
    method: 'GET',
    headers: jsonHeaders,
  })
}